import { createApp } from 'vue'
import ElementPlus from 'element-plus' // element-plus
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' // 国际化
import 'element-plus/dist/index.css'
import '@/assets/css/base.css'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

const app = createApp(App)

// 初始化公共样式
import '@/assets/css/main.css'
import 'element-plus/theme-chalk/src/index.scss'
import '@/assets/scss/theme/dark.scss'
import '@/assets/scss/base/common.scss'

// ls-echarts组件
import LsEcharts from '@/components/ls-echarts/index.vue'
app.use(LsEcharts)
// ls-nodata组件
import LsNodata from '@/components/ls-nodata/index.vue'
app.use(LsNodata)
// ls-tabs组件
import LsTabs from '@/components/ls-tabs/index.vue'
app.use(LsTabs)
// ls-table组件
import LsTable from '@/components/ls-table/index.vue'
import '@/components/ls-table/styles/style.css'
app.use(LsTable)

// 加载 element-plus
app.use(ElementPlus, {
  locale: zhCn, // 将中文设置为默认语言
  size: 'default' // 加载默认尺寸
})

app.use(createPinia())
app.use(router)
app.use(ElementPlus)
app.mount('#app')
